Skip to content

pkgs/idp-pki: cert-generation tooling and the IdP root CA (public certs only) - #13662

Merged
dezren39 merged 1 commit into
mainfrom
idp-pki-foundation
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
idp-pki-foundation

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Slice 1 (PKI foundation) of the IdP story #13658: the cert-generation tooling, plus the public certificates of the hierarchy it generated.

What is in here

  • pkgs/idp-pki/idp-ca.sh — idp-ca, a small openssl-backed CA:
    • init-root, create-intermediate
    • issue-leaf with profiles: server (EC P-256, serverAuth), client (EC P-256, clientAuth), saml-signing (RSA 2048), oidc-signing (RSA 2048)
    • revoke + gencrl (CRL generation), inspect, verify-chain (incl. --with-crl), status
    • CA keys are AES-256-CBC encrypted; the passphrase comes from IDP_CA_PASSPHRASE (never argv, never printed)
  • pkgs/idp-pki/default.nix — Nix package (idp-ca binary; builds clean, smoke-tested against the live CA state)
  • pkgs/idp-pki/trust/ — PUBLIC material only: root cert, issuing cert, chain, exactly as generated
  • pkgs/idp-pki/README.md — defaults and their reasoning, key handling, and the relationship to the fleet CA program (Fleet CA, credentials & secrets — v0.3 design mill (Summit build-out) #9155, the separate ML-DSA design track; convergence via cross-signing is recorded there and in the README)

The live hierarchy (generated 2026-11-23 on the laptop amd)

  • Root CA: CN=Developing Today IdP Root CA, O=Developing Today, EC P-384, valid 2026-11-23 → 2046-11-18
    SHA-256 fingerprint: 45:49:3A:F7:04:28:59:A6:E2:ED:73:7D:2C:7D:99:A7:BE:29:A3:0A:D6:BC:4F:E9:32:77:98:2B:9D:90:D1:3D
  • Issuing CA: CN=Developing Today IdP Issuing CA, O=Developing Today, EC P-384, valid 2026-11-23 → 2036-11-20
    SHA-256 fingerprint: B6:9F:25:C5:DE:AE:18:2B:A6:28:33:56:EC:99:54:DA:7C:56:BC:AC:B0:A6:AD:0F:86:6A:79:05:47:07:6A:42

Private keys were generated on amd only, are not in this PR (verified: no key material anywhere in the change), and are escrowed in Bitwarden Secrets under the names idp.root-ca.key and idp.issuing-ca.key; the key passphrase is vault-held as idp.ca-passphrase.

Verification (all on the laptop, public output)

  • openssl verify: issuing cert against root — OK; sample server leaf against the chain — OK
  • Revocation flow: sample leaf revoked, issuing CRL regenerated (lists serial 1000), and openssl verify -crl_check then rejects the leaf with "error 23: certificate revoked"
  • nix-build of the package succeeds; the built idp-ca status reads the live hierarchy

Note: an earlier same-day generation was discarded before publication and regenerated with fresh keys; nothing of it was published or escrowed, and its local logs were removed.


Get evidence
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

idp-ca is a small openssl-backed CA: init-root, create-intermediate,
issue-leaf (server, client, saml-signing, oidc-signing profiles), revoke,
CRL generation, inspection and chain verification, packaged with Nix.

The live hierarchy was generated 2026-11-23 on amd: an EC P-384 root CA
(20 years) and an issuing intermediate (10 years). CA private keys are
passphrase-encrypted and escrowed to Bitwarden Secrets under the names
idp.root-ca.key and idp.issuing-ca.key (passphrase: idp.ca-passphrase);
only the public certificates are committed, under trust/.

Slice 1 of the IdP story #13658. The fleet CA program (#9155) stays the
separate ML-DSA design track; see pkgs/idp-pki/README.md.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ef140c2b-db85-4d9c-9dbc-d6ca6479b95a
Commits

Reviewing files that changed from the base of the PR and between 8df9134 and a8111dc.

Files ignored due to path filters: 3

  • pkgs/idp-pki/trust/chain.pem is excluded by !**/*.pem
  • pkgs/idp-pki/trust/issuing-ca.crt.pem is excluded by !**/*.pem
  • pkgs/idp-pki/trust/root-ca.crt.pem is excluded by !**/*.pem
Files selected for processing: 3

  • pkgs/idp-pki/README.md
  • pkgs/idp-pki/default.nix
  • pkgs/idp-pki/idp-ca.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit baeead2 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the idp-pki-foundation branch November 23, 2026 19:59
@dezren39 dezren39 added the audit:partial PR partially implemented; gap filed label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:partial PR partially implemented; gap filed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant